#pragma once
#include "IKeyOperationWidget.h"
#include "Group.h"

#include <QMap>

class QListWidgetItem;

namespace Ui {
class KeyViewWidget;
}

namespace kryptos { namespace ui {

class KeyViewWidget : public IKeyOperationWidget
{
    Q_OBJECT
    
public:
    explicit KeyViewWidget(QWidget *parent = 0);
    ~KeyViewWidget();
    
    void fillIdentitiesAndGroups(const kryptos::entities::GroupList& groups);

    QMap<QString, QString> params();

private slots:

    void groupSelected(QListWidgetItem* item);

private:
    Ui::KeyViewWidget *ui;

    QMap<QString, kryptos::entities::Group> m_groupMap;
};

}}
